<%@ page import="javax.servlet.*,java.io.*" %>
<%@ page contentType="octet/stream" %>

<%
response.addHeader("Content-Disposition", "filename=test.doc");
File f = new File("c:\\alex.csv");
FileInputStream fis = new FileInputStream(f);
byte[] buffer = new byte[(int)f.length()];
fis.read(buffer,0,(int)f.length());
fis.close();
ServletOutputStream os = response.getOutputStream();
os.write(buffer);
os.close();
%>